<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:70:"/home/xlosycom/public_html/application/admin/view/admin/film_list.html";i:1523880304;s:45:"./application/index/view/index/head_meta.html";i:1523930539;s:45:"./application/index/view/index/head_link.html";i:1523885480;s:47:"./application/index/view/index/head_script.html";i:1523888906;s:69:"/home/xlosycom/public_html/application/admin/view/admin/navigate.html";i:1523897880;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <base href="<?php echo BASE_PATH; ?>">
    <title>影片管理</title>
    <!--引入头部meta文件 -->
    <meta name="pragma" content="no-cache">
<meta name="cache-control" content="no-cache">
<meta name="expires" content="0">
<meta name="keywords" content="<?php echo \think\Config::get('keywords'); ?>">
<meta name="description" content="<?php echo \think\Config::get('description'); ?>">
<meta http-equiv="Content-Type" content="<?php echo \think\Config::get('Content_Type'); ?>" />
<meta name="robots" content="<?php echo \think\Config::get('robots'); ?>">
<meta name="windows-Target" content="<?php echo \think\Config::get('windows_Target'); ?>">
<meta name="author" content="<?php echo \think\Config::get('author'); ?>">
<meta http-equiv="Content-Language" content="<?php echo \think\Config::get('content_language'); ?>"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!--引入头部link(css)文件 -->
    <link rel="shortcut icon" href="<?php echo \think\Config::get('page_icon'); ?>">
<link rel="stylesheet" href="public/static/css/base.css?v=<?php echo NOW_TIME; ?>"/>
<link rel="stylesheet" href="public/static/plugs/topNav/css/head.css?v=<?php echo NOW_TIME; ?>" />
<link rel="stylesheet" type="text/css" href="public/static/plugs/bootstrap3.3.7/css/bootstrap.css?v=<?php echo NOW_TIME; ?>">
    <!--引入头部script文件 -->
    <script src="public/static/js/jquery-2.0.0.min.js" type="text/javascript" charset="UTF-8" ></script>
<script src="public/static/js/base/base.js" type="text/javascript" charset="UTF-8" ></script>
<script src="public/static/plugs/bootstrap3.3.7/js/bootstrap.js" type="text/javascript" charset="UTF-8" ></script>
<script type="text/javascript" src="public/static/js/jquery.lazyload.min.js"></script>
<!--IE8只能支持jQuery1.9-->
<!--[if lte IE 8]>
<script src="http://cdn.bootcss.com/jquery/1.9.0/jquery.min.js"></script>
<!-->


    <!--=====================CSS_Link===========================-->
    <link href="public/static/css/admin/film_list.css?v=<?php echo NOW_TIME; ?>" type="text/css" rel="stylesheet" />
    <link href="public/static/css/common/page.css?v=<?php echo NOW_TIME; ?>" type="text/css" rel="stylesheet" />
    <!--=====================JS_Link===========================-->
    <!--导航-->
    <script>
        $(function () {
            $(".nav-title").click(function () {
                $(this).parent().find(".nav2-ul").toggle();
                if ($(this).find(".nav-icon").css("background-position") == "-144px -27px") {
                    $(this).find(".nav-icon").css("background-position", "-92px -27px");
                } else {
                    $(this).find(".nav-icon").css("background-position", "-144px -27px");
                }
            });

            /**影片删除*/
            $(".film-delete").click(function () {
                if(confirm("是否删除该影片？")){
                    var film_id = $(this).attr("film_id");
                    $.ajax({
                        type: "post",
                        url: "<?php echo url('admin/delFilm'); ?>",
                        cache: false,
                        data: "film_id=" + film_id,
                        dataType: 'json',  //接受数据格式
                        success: function (rs) {
                            var data = rs;
                            if (data.code == "1") {
                                alert("删除成功!");
                                location.reload();
                            } else {
                                alert("删除失败!");
                            }
                        },
                        error: function () {
                            alert("系统繁忙!");
                        }
                    });
                }
            });


            /**删除按钮显示*/
            $(".film-list li").mouseenter(function () {
                $(this).find(".film-delete").css("display","inline-block");
            });

            $(".film-list li").mouseleave(function () {
                $(this).find(".film-delete").css("display","none");
            });
        })
    </script>
    <!--导航-->
</head>
<body>
<div class="box">
    <div class="box-left">
        <!--引入导航html文件 -->
        <!--导航-->
<ul class="nav1-ul">
    <li class="nav1-li">
        <h4 class="nav-title"><i class="nav-icon">&nbsp;</i>影片管理</h4>
        <ul class="nav2-ul">
            <a href="<?php echo url('admin/film'); ?>">
                <li class="nav2-li">添加影片</li>
            </a>
            <a href="<?php echo url('admin/film_list'); ?>">
                <li class="nav2-li">所有影片</li>
            </a>
        </ul>
    </li>
    <li class="nav1-li">
        <h4 class="nav-title"><i class="nav-icon">&nbsp;</i>目录管理</h4>
        <ul class="nav2-ul">
            <a href="<?php echo url('admin/catalogs'); ?>">
                <li class="nav2-li">添加目录</li>
            </a>
            <a href="<?php echo url('admin/vip_manager'); ?>">
                <li class="nav2-li">VIP管理</li>
            </a>
        </ul>
    </li>
</ul>
<!--导航-->
    </div>
    <div class="box-right">
        <div class="search-box">
            <form action="<?php echo url('admin/film_list'); ?>" method="post">
                <input type="search" name="name" value="<?php echo $name; ?>" autocomplete="off"
                       placeholder="请输入影片名称"/>
            </form>
        </div>
        <div style="width:100%;margin: 3px auto;">
            <ul class="film-list">
                <?php if(is_array($filmList) || $filmList instanceof \think\Collection || $filmList instanceof \think\Paginator): $i = 0; $__LIST__ = $filmList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?>
                    <li>
                        <span class="film-delete" film_id = <?php echo $list['id']; ?>>X</span>
                        <a href="<?php echo url('admin/film','film_id='.$list['id']); ?>">
                            <div title="<?php echo $list['name']; ?>"><img src="<?php echo str_replace('static/upload','public/static/upload',$list['image']); ?>"></div>
                        </a>
                        <div class="film-info">
                            <a href="<?php echo url('admin/film','film_id='.$list['id']); ?>" title="<?php echo $list['name']; ?>"><?php echo $list['name']; ?></a>
                            <p><?php echo $list['onDecade']; ?>-<?php echo $list['typeName']; ?></p>
                        </div>
                    </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
        <div style="text-align: right;"><?php echo $filmList->render(); ?></div>
    </div>
</div>
</body>
</html>